package com.book.shop.controller;

import com.book.shop.Webservice.OrderService;
import com.book.shop.Webservice.UserService;
import com.book.shop.model.Order;
import com.book.shop.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class TestController {
    @Autowired
    private OrderService orderService;
    @Autowired
    private UserService userService;



    @GetMapping("/all")
    public List<User> getAllUser(){
        return userService.findAllUsers();
    }
}